package com.zpl.order.controller;

import com.zpl.core.Result;
import com.zpl.order.enums.Brand;
import com.zpl.order.enums.OrderStatus;
import com.zpl.order.enums.PaymentMethod;
import com.zpl.order.enums.Status;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/common")
public class CommonController {
    @GetMapping("orderstatus")
    public Result getOrderStatus(){
        return Result.success(OrderStatus.toJson());
    }
    @GetMapping("paymentmethod")
    public Result getRole(){
        return Result.success(PaymentMethod.toJson());
    }
    @GetMapping("status")
    public Result getStatus(){
        return Result.success(Status.toJson());
    }
    @GetMapping("brand")
    public Result getBrand(){
        return Result.success(Brand.toJson());
    }
}
